package com.pengliu.common.bean;

import com.pengliu.common.mybatis.model.ModelExample;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * @author pengliu
 */
public class SysRoleAuthExample extends ModelExample implements Serializable {
    /**
     * 这字段对应的数据库表 sys_role_auth
     *
     * @mbggenerated
     */
    protected String orderByClause;

    /**
     * 这字段对应的数据库表 sys_role_auth
     *
     * @mbggenerated
     */
    protected boolean distinct;

    /**
     * 这字段对应的数据库表 sys_role_auth
     *
     * @mbggenerated
     */
    protected List<Criteria> oredCriteria;

    /**
     * 这字段对应的数据库表 sys_role_auth
     *
     * @mbggenerated
     */
    private static final long serialVersionUID = 1L;

    /**
     * 此方法对应于数据库表 sys_role_auth
     *
     * @mbggenerated
     */
    public SysRoleAuthExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    /**
     * 此方法对应于数据库表 sys_role_auth
     *
     * @mbggenerated
     */
    @Override
    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    /**
     * 此方法对应于数据库表 sys_role_auth
     *
     * @mbggenerated
     */
    public String getOrderByClause() {
        return orderByClause;
    }

    /**
     * 此方法对应于数据库表 sys_role_auth
     *
     * @mbggenerated
     */
    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    /**
     * 此方法对应于数据库表 sys_role_auth
     *
     * @mbggenerated
     */
    public boolean isDistinct() {
        return distinct;
    }

    /**
     * 此方法对应于数据库表 sys_role_auth
     *
     * @mbggenerated
     */
    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    /**
     * 此方法对应于数据库表 sys_role_auth
     *
     * @mbggenerated
     */
    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    /**
     * 此方法对应于数据库表 sys_role_auth
     *
     * @mbggenerated
     */
    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    /**
     * 此方法对应于数据库表 sys_role_auth
     *
     * @mbggenerated
     */
    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    /**
     * 此方法对应于数据库表 sys_role_auth
     *
     * @mbggenerated
     */
    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    /**
     * 此方法对应于数据库表 sys_role_auth
     *
     * @mbggenerated
     */
    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    /**
     * 此方法对应于数据库表 sys_role_auth
     *
     * @mbggenerated
     */
    public Criteria getCriteria() {
        if (oredCriteria.size() == 0) {createCriteria();}
        return oredCriteria.get(0);
    }

    /**
     * 此方法对应于数据库表 sys_role_auth
     *
     * @mbggenerated
     */
    @Override
    public void addCriteria(List<Criterion> criteria) {
        getCriteria().getCriteria().addAll(criteria);
    }

    /**
     * This class was generated by MyBatis Generator.
     * This class corresponds to the database table sys_role_auth
     *
     * @mbggenerated
     */
    protected abstract static class GeneratedCriteria implements Serializable {
        protected List<Criterion> criteria;

        private boolean ignoreNull;

        private boolean isIgnoreNull() {
            return ignoreNull;
        }

        public Criteria ignoreNull() {
            this.ignoreNull = true;
            return (Criteria) this;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                if (!isIgnoreNull()) {
                    throw new RuntimeException("条件的值不能为空");
                }} else {
                    criteria.add(new Criterion(condition));}
                }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                if (!isIgnoreNull()) {
                    throw new RuntimeException("条件: " + property + " 是为Null");
                }} else {
                    criteria.add(new Criterion(condition, value));}
                }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                if (!isIgnoreNull()) {
                    throw new RuntimeException("Between 的条件值: " + property + " 是为Null");
                }} else {
                    criteria.add(new Criterion(condition, value1, value2));}
                }

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Integer value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Integer value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Integer value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Integer value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Integer value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Integer> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Integer> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Integer value1, Integer value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Integer value1, Integer value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andSysRoleIdIsNull() {
            addCriterion("sys_role_id is null");
            return (Criteria) this;
        }

        public Criteria andSysRoleIdIsNotNull() {
            addCriterion("sys_role_id is not null");
            return (Criteria) this;
        }

        public Criteria andSysRoleIdEqualTo(Integer value) {
            addCriterion("sys_role_id =", value, "sysRoleId");
            return (Criteria) this;
        }

        public Criteria andSysRoleIdNotEqualTo(Integer value) {
            addCriterion("sys_role_id <>", value, "sysRoleId");
            return (Criteria) this;
        }

        public Criteria andSysRoleIdGreaterThan(Integer value) {
            addCriterion("sys_role_id >", value, "sysRoleId");
            return (Criteria) this;
        }

        public Criteria andSysRoleIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("sys_role_id >=", value, "sysRoleId");
            return (Criteria) this;
        }

        public Criteria andSysRoleIdLessThan(Integer value) {
            addCriterion("sys_role_id <", value, "sysRoleId");
            return (Criteria) this;
        }

        public Criteria andSysRoleIdLessThanOrEqualTo(Integer value) {
            addCriterion("sys_role_id <=", value, "sysRoleId");
            return (Criteria) this;
        }

        public Criteria andSysRoleIdIn(List<Integer> values) {
            addCriterion("sys_role_id in", values, "sysRoleId");
            return (Criteria) this;
        }

        public Criteria andSysRoleIdNotIn(List<Integer> values) {
            addCriterion("sys_role_id not in", values, "sysRoleId");
            return (Criteria) this;
        }

        public Criteria andSysRoleIdBetween(Integer value1, Integer value2) {
            addCriterion("sys_role_id between", value1, value2, "sysRoleId");
            return (Criteria) this;
        }

        public Criteria andSysRoleIdNotBetween(Integer value1, Integer value2) {
            addCriterion("sys_role_id not between", value1, value2, "sysRoleId");
            return (Criteria) this;
        }

        public Criteria andSysAuthIdIsNull() {
            addCriterion("sys_auth_id is null");
            return (Criteria) this;
        }

        public Criteria andSysAuthIdIsNotNull() {
            addCriterion("sys_auth_id is not null");
            return (Criteria) this;
        }

        public Criteria andSysAuthIdEqualTo(Integer value) {
            addCriterion("sys_auth_id =", value, "sysAuthId");
            return (Criteria) this;
        }

        public Criteria andSysAuthIdNotEqualTo(Integer value) {
            addCriterion("sys_auth_id <>", value, "sysAuthId");
            return (Criteria) this;
        }

        public Criteria andSysAuthIdGreaterThan(Integer value) {
            addCriterion("sys_auth_id >", value, "sysAuthId");
            return (Criteria) this;
        }

        public Criteria andSysAuthIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("sys_auth_id >=", value, "sysAuthId");
            return (Criteria) this;
        }

        public Criteria andSysAuthIdLessThan(Integer value) {
            addCriterion("sys_auth_id <", value, "sysAuthId");
            return (Criteria) this;
        }

        public Criteria andSysAuthIdLessThanOrEqualTo(Integer value) {
            addCriterion("sys_auth_id <=", value, "sysAuthId");
            return (Criteria) this;
        }

        public Criteria andSysAuthIdIn(List<Integer> values) {
            addCriterion("sys_auth_id in", values, "sysAuthId");
            return (Criteria) this;
        }

        public Criteria andSysAuthIdNotIn(List<Integer> values) {
            addCriterion("sys_auth_id not in", values, "sysAuthId");
            return (Criteria) this;
        }

        public Criteria andSysAuthIdBetween(Integer value1, Integer value2) {
            addCriterion("sys_auth_id between", value1, value2, "sysAuthId");
            return (Criteria) this;
        }

        public Criteria andSysAuthIdNotBetween(Integer value1, Integer value2) {
            addCriterion("sys_auth_id not between", value1, value2, "sysAuthId");
            return (Criteria) this;
        }
    }

    /**
     * This class was generated by MyBatis Generator.
     * This class corresponds to the database table sys_role_auth
     *
     * @mbggenerated do_not_delete_during_merge
     */
    public static class Criteria extends GeneratedCriteria implements Serializable {

        protected Criteria() {
            super();
        }
    }
}